//
//  CLpresentWebView.m
//  I-want-go
//
//  Created by dllo on 15/10/23.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "CLpresentWebView.h"
#import "CLtool.h"
#import "CLscreen.h"
@interface CLpresentWebView ()<UIWebViewDelegate>
@property(nonatomic, retain)MBProgressHUD *hud;
@end

@implementation CLpresentWebView

- (void)dealloc {
    [_webStr release];
    [_hud release];
    [super dealloc];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor grayColor];
//    self.tabBarController.tabBar.hidden = YES;
//    self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
//    self.hud.labelText = @"正在加载";
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, 375 * SWIDTH, 553 *SHEIGHT)];
    [self.view addSubview:webView];
    webView.delegate = self;
    webView.scalesPageToFit = YES;
    self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    self.hud.labelText = @"正在加载";

    NSString *strURL = self.webStr;
    NSURL *url = [NSURL URLWithString:strURL];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url];
    [webView loadRequest:request];
    self.hud.hidden = YES;
    
}



//
//- (void)viewWillDisappear:(BOOL)animated {
//    self.tabBarController.tabBar.hidden = NO;
//}



//- (void)viewWillAppear:(BOOL)animated {
//    self.tabBarController.tabBar.hidden = YES;
//  
//}
//
//- (void)viewWillDisappear:(BOOL)animated {
//    self.tabBarController.tabBar.hidden = NO;
//}






- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
